<template>
  <div class="">
    <p>可以在路由配置时定义导航栏的背景色，可以通过vuex的set_navBarTitle方法设置标题，更多可在readme.md文件查看</p>
    <van-button type="primary" @click="switchTitle">切换标题</van-button>
  </div>
</template>

<script setup>
import { useStore } from 'vuex';

const vuex = useStore()
const switchTitle = () => {
  vuex.commit('set_navBarTitle', '我是标题');
}
</script>

<style lang="scss" scoped></style>
